home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Equipement / hMailServer / hMailServer-4.1-Build-136.exe / {app} / PHPWebAdmin / settings_ipranges_edit.php < prev    next >
PHP Script  |  2005-01-06  |  3KB  |  71 lines

  1. <?php
  2. /*
  3. ** $Id: settings_ipranges_edit.php,v 1.3 2005/01/05 22:22:50 hmailserver Exp $
  4. **
  5. **    hMailServer - Web interface
  6. **
  7. **    File formatted using TAB size 4
  8. **
  9. **    Get hMailserver at http://www.hmailserver.com
  10. **
  11. **    Author: Steen Rab°l <srabol@mail.tele.dk>
  12. **    Copyright (c) 2004, Steen Rab°l <srabol@mail.tele.dk>
  13. **
  14. **  This program is free software; you can redistribute it and/or modify
  15. **  it under the terms of the GNU General Public License as published by
  16. **  the Free Software Foundation; either version 2 of the License, or
  17. **  (at your option) any later version.
  18. **
  19. **  You may not change or alter any portion of this comment or credits
  20. **  of supporting developers from this source code or any supporting
  21. **  source code which is considered copyrighted (c) material of the
  22. **  original comment or credit authors.
  23. **
  24. **  This program is distributed in the hope that it will be useful,
  25. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27. **  GNU General Public License for more details.
  28. **
  29. **  You should have received a copy of the GNU General Public License
  30. **  along with this program; if not, write to the Free Software
  31. **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  32. **
  33. */
  34.  
  35. if (hmailGetAdminLevel() != 2)
  36.     hmailHackingAttemp();
  37.  
  38.  
  39. $function            = hmailGetVar("function","");
  40. $IPRangeID            = hmailGetVar("IPRangeID",0);
  41. $obSettings            = $obBaseApp->Settings();
  42. $obSecurityRanges    = $obSettings->SecurityRanges();
  43. $obSecurityRanges->Refresh();
  44. $obSecurityRange    = $obSecurityRanges->ItemByDBID($IPRangeID);
  45.  
  46. if($function == "doedit")
  47. {
  48.     $obSecurityRange->Name                                = hmailGetVar("Name");
  49.     $obSecurityRange->LowerIP                            = hmailGetVar("LowerIP");
  50.     $obSecurityRange->UpperIP                            = hmailGetVar("UpperIP");
  51.     $obSecurityRange->Priority                            = hmailGetVar("Priority");
  52.     $obSecurityRange->AllowSMTPConnections                = hmailGetVar("AllowSMTPConnections",0);
  53.     $obSecurityRange->RequireAuthForDeliveryToLocal        = hmailGetVar("RequireAuthForDeliveryToLocal",0);
  54.     $obSecurityRange->AllowPOP3Connections                = hmailGetVar("AllowPOP3Connections",0);
  55.     $obSecurityRange->RequireAuthForDeliveryToRemote    = hmailGetVar("RequireAuthForDeliveryToRemote",0);
  56.     $obSecurityRange->AllowIMAPConnections                = hmailGetVar("AllowIMAPConnections",0);
  57.     $obSecurityRange->AllowDeliveryFromLocalToLocal        = hmailGetVar("AllowDeliveryFromLocalToLocal",0);
  58.     $obSecurityRange->AllowDeliveryFromLocalToRemote    = hmailGetVar("AllowDeliveryFromLocalToRemote",0);
  59.     $obSecurityRange->AllowDeliveryFromRemoteToLocal    = hmailGetVar("AllowDeliveryFromRemoteToLocal",0);
  60.     $obSecurityRange->AllowDeliveryFromRemoteToRemote    = hmailGetVar("AllowDeliveryFromRemoteToRemote",0);
  61.     $obSecurityRange->Save();
  62.     
  63.     header("refresh:0; url=index.php?page=settings_ipranges");
  64.     
  65.     exit();
  66. }
  67.  
  68. $hmailSmarty->assign("range", $obSecurityRange);
  69. $hmailSmarty->assign("settings", $obSettings);
  70. $hmailSmarty->assign("pagecontent", $hmailSmarty->fetch('settings_ipranges_edit.tpl'));
  71. ?>